Skip to content

Fix CrashLog editorconfig violations breaking the Windows build#14

Merged
StuartMeeks merged 2 commits into
masterfrom
fix/crashlog-editorconfig
May 30, 2026
Merged

Fix CrashLog editorconfig violations breaking the Windows build#14
StuartMeeks merged 2 commits into
masterfrom
fix/crashlog-editorconfig

Conversation

@StuartMeeks

@StuartMeeks StuartMeeks commented May 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • PR Log unhandled exceptions to %LOCALAPPDATA%\Snipdeck\logs\unhandled.log #13 was merged while CI was red. The Windows build has been broken on master since 14b72e1.
  • Three editorconfig rules fired under TreatWarningsAsErrors, all in CrashLog.cs:
    • IDE0058: discarded StringBuilder fluent chains and Directory.CreateDirectory returns — fixed with _ =.
    • IDE0330: .NET 9's new System.Threading.Lock is preferred over a plain object lock target.
    • IDE0370: the ! on ex.StackTrace was unnecessary; the IsNullOrWhiteSpace check above already narrows for the analyser.

Test plan

  • Core builds clean on Linux.
  • Windows CI on this PR turns green.

🤖 Generated with Claude Code

StuartMeeks and others added 2 commits May 30, 2026 01:02
Three rules tripped on the Windows job (TreatWarningsAsErrors fires
these as build breaks, not warnings):

- IDE0058: StringBuilder fluent chains and Directory.CreateDirectory
  return values were ignored. Prefix with '_ = '.
- IDE0330: .NET 9 introduced System.Threading.Lock, which the analyser
  now prefers over a plain object for the lock target.
- IDE0370: the '!' on ex.StackTrace was unnecessary; the IsNullOrWhiteSpace
  check above it already narrows the type for the analyser.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
System.Threading is in the SDK's implicit-usings set, so the explicit
using directive trips IDE0005 (which TreatWarningsAsErrors turns into
a build break).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@StuartMeeks StuartMeeks merged commit 433e9ea into master May 30, 2026
4 checks passed
@StuartMeeks StuartMeeks deleted the fix/crashlog-editorconfig branch May 30, 2026 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant